package cn.edu.scau.cmi.wujiaxian.client;

import java.io.IOException;
import java.util.Objects;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * @author XiaoHuaShiFu
 */
public class HibernateJavafxClient extends Application {
    
    @Override
    public void start(Stage primaryStage) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader();
        Parent parent = fxmlLoader.load(Objects.requireNonNull(
        		HibernateJavafxClient.class.getClassLoader().getResourceAsStream(
                        "cn/edu/scau/cmi/wujiaxian/comprehension/client/index.fxml")));
        Scene scene = new Scene(parent);
        primaryStage.setTitle("Hibernate实验");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
//        launch(args);
        Platform.runLater(new Runnable() {
			public void run() {
				try {
					new HibernateJavafxClient().start(new Stage());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		});
    }
    
}
